3.4.92 \(\int \sec ^5(c+d x) (a+b \sin (c+d x))^2 \, dx\) [392]

Optimal. Leaf size=99 \[ \frac {\left (3 a^2-b^2\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {\sec ^4(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{4 d}+\frac {\sec ^2(c+d x) \left (2 a b+\left (3 a^2-b^2\right ) \sin (c+d x)\right )}{8 d} \]

[Out]

1/8*(3*a^2-b^2)*arctanh(sin(d*x+c))/d+1/4*sec(d*x+c)^4*(b+a*sin(d*x+c))*(a+b*sin(d*x+c))/d+1/8*sec(d*x+c)^2*(2
*a*b+(3*a^2-b^2)*sin(d*x+c))/d

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 99, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {2747, 753, 653, 212} \begin {gather*} \frac {\left (3 a^2-b^2\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {\sec ^2(c+d x) \left (\left (3 a^2-b^2\right ) \sin (c+d x)+2 a b\right )}{8 d}+\frac {\sec ^4(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))}{4 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^5*(a + b*Sin[c + d*x])^2,x]

[Out]

((3*a^2 - b^2)*ArcTanh[Sin[c + d*x]])/(8*d) + (Sec[c + d*x]^4*(b + a*Sin[c + d*x])*(a + b*Sin[c + d*x]))/(4*d)
 + (Sec[c + d*x]^2*(2*a*b + (3*a^2 - b^2)*Sin[c + d*x]))/(8*d)

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 653

Int[((d_) + (e_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((a*e - c*d*x)/(2*a*c*(p + 1)))*(a + c*x
^2)^(p + 1), x] + Dist[d*((2*p + 3)/(2*a*(p + 1))), Int[(a + c*x^2)^(p + 1), x], x] /; FreeQ[{a, c, d, e}, x]
&& LtQ[p, -1] && NeQ[p, -3/2]

Rule 753

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(d + e*x)^(m - 1)*(a*e - c*d*x)*((a
 + c*x^2)^(p + 1)/(2*a*c*(p + 1))), x] + Dist[1/((p + 1)*(-2*a*c)), Int[(d + e*x)^(m - 2)*Simp[a*e^2*(m - 1) -
 c*d^2*(2*p + 3) - d*c*e*(m + 2*p + 2)*x, x]*(a + c*x^2)^(p + 1), x], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^
2 + a*e^2, 0] && LtQ[p, -1] && GtQ[m, 1] && IntQuadraticQ[a, 0, c, d, e, m, p, x]

Rule 2747

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^m*(b^2 - x^2)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && Integer
Q[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int \sec ^5(c+d x) (a+b \sin (c+d x))^2 \, dx &=\frac {b^5 \text {Subst}\left (\int \frac {(a+x)^2}{\left (b^2-x^2\right )^3} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {\sec ^4(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{4 d}-\frac {b^3 \text {Subst}\left (\int \frac {-3 a^2+b^2-2 a x}{\left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{4 d}\\ &=\frac {\sec ^4(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{4 d}+\frac {\sec ^2(c+d x) \left (2 a b+\left (3 a^2-b^2\right ) \sin (c+d x)\right )}{8 d}+\frac {\left (b \left (3 a^2-b^2\right )\right ) \text {Subst}\left (\int \frac {1}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{8 d}\\ &=\frac {\left (3 a^2-b^2\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {\sec ^4(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{4 d}+\frac {\sec ^2(c+d x) \left (2 a b+\left (3 a^2-b^2\right ) \sin (c+d x)\right )}{8 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.78, size = 166, normalized size = 1.68 \begin {gather*} \frac {4 \left (-a^2+b^2\right ) \sec ^4(c+d x) (b-a \sin (c+d x)) (a+b \sin (c+d x))^3+\left (-3 a^2+b^2\right ) \left (\left (a^2-b^2\right )^2 (\log (1-\sin (c+d x))-\log (1+\sin (c+d x)))+2 a^3 b \sec ^2(c+d x)-2 \left (a^4-b^4\right ) \sec (c+d x) \tan (c+d x)+\left (-6 a^3 b+4 a b^3\right ) \tan ^2(c+d x)\right )}{16 \left (a^2-b^2\right )^2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^5*(a + b*Sin[c + d*x])^2,x]

[Out]

(4*(-a^2 + b^2)*Sec[c + d*x]^4*(b - a*Sin[c + d*x])*(a + b*Sin[c + d*x])^3 + (-3*a^2 + b^2)*((a^2 - b^2)^2*(Lo
g[1 - Sin[c + d*x]] - Log[1 + Sin[c + d*x]]) + 2*a^3*b*Sec[c + d*x]^2 - 2*(a^4 - b^4)*Sec[c + d*x]*Tan[c + d*x
] + (-6*a^3*b + 4*a*b^3)*Tan[c + d*x]^2))/(16*(a^2 - b^2)^2*d)

________________________________________________________________________________________

Maple [A]
time = 0.42, size = 131, normalized size = 1.32

method result size
derivativedivides \(\frac {a^{2} \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+\frac {a b}{2 \cos \left (d x +c \right )^{4}}+b^{2} \left (\frac {\sin ^{3}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}+\frac {\sin ^{3}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )}{8}-\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) \(131\)
default \(\frac {a^{2} \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+\frac {a b}{2 \cos \left (d x +c \right )^{4}}+b^{2} \left (\frac {\sin ^{3}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}+\frac {\sin ^{3}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )}{8}-\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) \(131\)
risch \(\frac {i \left (-3 a^{2} {\mathrm e}^{7 i \left (d x +c \right )}+b^{2} {\mathrm e}^{7 i \left (d x +c \right )}-11 a^{2} {\mathrm e}^{5 i \left (d x +c \right )}-7 b^{2} {\mathrm e}^{5 i \left (d x +c \right )}+11 a^{2} {\mathrm e}^{3 i \left (d x +c \right )}+7 b^{2} {\mathrm e}^{3 i \left (d x +c \right )}-32 i a b \,{\mathrm e}^{4 i \left (d x +c \right )}+3 a^{2} {\mathrm e}^{i \left (d x +c \right )}-b^{2} {\mathrm e}^{i \left (d x +c \right )}\right )}{4 d \left (1+{\mathrm e}^{2 i \left (d x +c \right )}\right )^{4}}-\frac {3 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b^{2}}{8 d}+\frac {3 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{8 d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b^{2}}{8 d}\) \(231\)
norman \(\frac {\frac {8 a b \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {8 a b \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {\left (5 a^{2}+b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {\left (5 a^{2}+b^{2}\right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {\left (7 a^{2}+11 b^{2}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}+\frac {\left (7 a^{2}+11 b^{2}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}+\frac {\left (13 a^{2}+9 b^{2}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {\left (13 a^{2}+9 b^{2}\right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {4 a b \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {4 a b \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {8 a b \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}-\frac {\left (3 a^{2}-b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}+\frac {\left (3 a^{2}-b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) \(336\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^5*(a+b*sin(d*x+c))^2,x,method=_RETURNVERBOSE)

[Out]

1/d*(a^2*(-(-1/4*sec(d*x+c)^3-3/8*sec(d*x+c))*tan(d*x+c)+3/8*ln(sec(d*x+c)+tan(d*x+c)))+1/2*a*b/cos(d*x+c)^4+b
^2*(1/4*sin(d*x+c)^3/cos(d*x+c)^4+1/8*sin(d*x+c)^3/cos(d*x+c)^2+1/8*sin(d*x+c)-1/8*ln(sec(d*x+c)+tan(d*x+c))))

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 115, normalized size = 1.16 \begin {gather*} \frac {{\left (3 \, a^{2} - b^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (3 \, a^{2} - b^{2}\right )} \log \left (\sin \left (d x + c\right ) - 1\right ) - \frac {2 \, {\left ({\left (3 \, a^{2} - b^{2}\right )} \sin \left (d x + c\right )^{3} - 4 \, a b - {\left (5 \, a^{2} + b^{2}\right )} \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1}}{16 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^5*(a+b*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

1/16*((3*a^2 - b^2)*log(sin(d*x + c) + 1) - (3*a^2 - b^2)*log(sin(d*x + c) - 1) - 2*((3*a^2 - b^2)*sin(d*x + c
)^3 - 4*a*b - (5*a^2 + b^2)*sin(d*x + c))/(sin(d*x + c)^4 - 2*sin(d*x + c)^2 + 1))/d

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 118, normalized size = 1.19 \begin {gather*} \frac {{\left (3 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (3 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 8 \, a b + 2 \, {\left ({\left (3 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + 2 \, a^{2} + 2 \, b^{2}\right )} \sin \left (d x + c\right )}{16 \, d \cos \left (d x + c\right )^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^5*(a+b*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

1/16*((3*a^2 - b^2)*cos(d*x + c)^4*log(sin(d*x + c) + 1) - (3*a^2 - b^2)*cos(d*x + c)^4*log(-sin(d*x + c) + 1)
 + 8*a*b + 2*((3*a^2 - b^2)*cos(d*x + c)^2 + 2*a^2 + 2*b^2)*sin(d*x + c))/(d*cos(d*x + c)^4)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sin {\left (c + d x \right )}\right )^{2} \sec ^{5}{\left (c + d x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**5*(a+b*sin(d*x+c))**2,x)

[Out]

Integral((a + b*sin(c + d*x))**2*sec(c + d*x)**5, x)

________________________________________________________________________________________

Giac [A]
time = 7.98, size = 118, normalized size = 1.19 \begin {gather*} \frac {{\left (3 \, a^{2} - b^{2}\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) - {\left (3 \, a^{2} - b^{2}\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (3 \, a^{2} \sin \left (d x + c\right )^{3} - b^{2} \sin \left (d x + c\right )^{3} - 5 \, a^{2} \sin \left (d x + c\right ) - b^{2} \sin \left (d x + c\right ) - 4 \, a b\right )}}{{\left (\sin \left (d x + c\right )^{2} - 1\right )}^{2}}}{16 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^5*(a+b*sin(d*x+c))^2,x, algorithm="giac")

[Out]

1/16*((3*a^2 - b^2)*log(abs(sin(d*x + c) + 1)) - (3*a^2 - b^2)*log(abs(sin(d*x + c) - 1)) - 2*(3*a^2*sin(d*x +
 c)^3 - b^2*sin(d*x + c)^3 - 5*a^2*sin(d*x + c) - b^2*sin(d*x + c) - 4*a*b)/(sin(d*x + c)^2 - 1)^2)/d

________________________________________________________________________________________

Mupad [B]
time = 5.10, size = 93, normalized size = 0.94 \begin {gather*} \frac {\mathrm {atanh}\left (\sin \left (c+d\,x\right )\right )\,\left (\frac {3\,a^2}{8}-\frac {b^2}{8}\right )}{d}+\frac {\left (\frac {b^2}{8}-\frac {3\,a^2}{8}\right )\,{\sin \left (c+d\,x\right )}^3+\left (\frac {5\,a^2}{8}+\frac {b^2}{8}\right )\,\sin \left (c+d\,x\right )+\frac {a\,b}{2}}{d\,\left ({\sin \left (c+d\,x\right )}^4-2\,{\sin \left (c+d\,x\right )}^2+1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*sin(c + d*x))^2/cos(c + d*x)^5,x)

[Out]

(atanh(sin(c + d*x))*((3*a^2)/8 - b^2/8))/d + ((a*b)/2 + sin(c + d*x)*((5*a^2)/8 + b^2/8) - sin(c + d*x)^3*((3
*a^2)/8 - b^2/8))/(d*(sin(c + d*x)^4 - 2*sin(c + d*x)^2 + 1))

________________________________________________________________________________________